home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / fdutils.postinst < prev    next >
Encoding:
Text File  |  2007-03-05  |  1.8 KB  |  61 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. . /usr/share/debconf/confmodule
  5.  
  6. # Automatically added by dh_installdocs
  7. if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then
  8.     install-docs -i /usr/share/doc-base/fdutils-faq
  9. fi
  10. # End automatically added section
  11. # Automatically added by dh_installdocs
  12. if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then
  13.     install-docs -i /usr/share/doc-base/fdutils
  14. fi
  15. # End automatically added section
  16.  
  17.  
  18. case "$1" in
  19.     configure)
  20.     install-info --description='Linux floppy utilities' \
  21.         --section "Disk Management" "Disk Management" \
  22.         --quiet /usr/share/info/fdutils.info.gz
  23.  
  24.     if [ -e /etc/fdmount.conf ]; then
  25.         TMPFILE="$(mktemp -q /tmp/fdmount.conf.tmp.XXXXXX)"
  26.         db_get fdutils/fdmount_setuid
  27.         if [ "$RET" = true ] \
  28.         && grep -q '^is_suid=n.*' /etc/fdmount.conf; then
  29.         sed -e 's/^is_suid=.*$/is_suid=yes/' </etc/fdmount.conf >>"$TMPFILE"
  30.         chmod 644 "$TMPFILE"
  31.         mv "$TMPFILE" /etc/fdmount.conf
  32.         dpkg-statoverride --update --add root floppy 4750 /usr/bin/fdmount
  33.         elif [ "$RET" = false ] \
  34.         && grep -q '^is_suid=y.*' /etc/fdmount.conf; then
  35.         sed -e 's/^is_suid=.*$/is_suid=no/' </etc/fdmount.conf >>"$TMPFILE"
  36.         chmod 644 "$TMPFILE"
  37.         mv "$TMPFILE" /etc/fdmount.conf
  38.         chmod u-s /usr/bin/fdmount
  39.         dpkg-statoverride --remove /usr/bin/fdmount
  40.         fi
  41.         if [ -e "$TMPFILE" ]; then
  42.         rm -f "$TMPFILE"
  43.         fi
  44.     fi
  45.  
  46.     if [ -e "/etc/fdprm" ]; then
  47.         echo "Fdutils-5.0 introduced two new configuration files: /etc/mediaprm and" >&2
  48.         echo "/etc/driveprm.  They replace the old /etc/fdprm." >&2
  49.         echo "Renaming old file /etc/fdprm to /etc/fdprm.obsolete ..." >&2
  50.         mv -f /etc/fdprm /etc/fdprm.obsolete
  51.         echo >&2
  52.     fi
  53.     ;;
  54.  
  55.     abort-upgrade|abort-remove|abort-deconfigure)
  56.     ;;
  57.     *)
  58.     echo "postinst called with unknown argument \`$1'" >&2
  59.     ;;
  60. esac
  61.